package com.ruoyi.project.student.controller;

import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.student.domain.Class;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.project.student.domain.param.StudentListParam;
import com.ruoyi.project.student.domain.vo.StudentListVo;
import com.ruoyi.project.student.service.ClassService;
import com.ruoyi.project.student.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 班级
 *
 * @author ruoyi
 */
@RestController
@RequestMapping("/class")
public class ClassController extends BaseController {
    @Autowired
    private ClassService classService;

    /**
     * 获取所有班级列表
     */
    @PreAuthorize("@ss.hasPermi('class:list')")
    @GetMapping("/list/all")
    public TableDataInfo list(Class param)
    {
//        startPage();
        List<Class> list = classService.getAllClassList(param);
        return getDataTable(list);
    }
}
